<!--
  @author heguanghua
  @since 2019/06/12 19:34
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<table class="layui-hide" id="zmn-table" lay-filter="zmn-table" th:fragment="table">
    <thead>
    <tr>
        <th lay-data="{field:'sort', width:80, unresize:true, sort:true, align:'center', edit:'text'}">排序</th>
        <th lay-data="{field:'msgId', width:80, unresize:true, align:'center'}">ID</th>
        <th lay-data="{field:'name', unresize:true, align:'center'}">消息名称</th>
        <th lay-data="{field:'scene', unresize:true, align:'center'}">使用场景</th>
        <th lay-data="{field:'type', width:180, unresize:true, align:'center'}">消息类型</th>
        <th lay-data="{field:'status', width:110, unresize:true, align:'center'}">状态</th>
        <th lay-data="{field:'createTime', width:250, unresize:true, align:'center'}">创建人/创建时间</th>
        <th lay-data="{field:'updateTime', width:250, unresize:true, align:'center'}">最近修改人/时间</th>
        <th lay-data="{field:'操作', width:80, unresize:true, align:'center', fixed:'right'}">操作</th>
    </tr>
    </thead>

    <tbody>
    <tr th:each="item:${items}">
        <td th:text="${item.sort}">sort</td>
        <td th:text="${item.msgId}" class="">msgId</td>
        <td th:text="${item.name}" class="layui-gray">title</td>
        <td th:text="${item.scene}" class="layui-gray">version</td>
        <td th:text="${T(com.zmn.plat.common.dictionary.MsgTypeEnum).of(item.type).name}" class="">type</td>
        <td>
            <div th:onmouseover="|show_tips(${(#authPermit.checkPermit('/msg/conf/updateStatus.action'))},'请先开启“启用/停用”的权限',this)|">
                <input th:disabled="${(#authPermit.checkPermit('/msg/conf/updateStatus.action'))?'false':'true'}" type="checkbox" name="status" id="status" th:key="${item.msgId}" th:value="${item.status}"
                       lay-text="ON|OFF" lay-skin="switch" lay-filter="chk_one_status" th:checked="${item.status == 2}"/>
            </div>
        </td>
        <td th:text="${item.creater + '/' + T(com.zmn.common.utils.date.DateUtil).toString(item.createTime)}">creater</td>
        <td th:text="${item.updater + '/' + T(com.zmn.common.utils.date.DateUtil).toString(item.updateTime)}">updateTime</td>
        <td>
            <a th:if="${#authPermit.checkPermit('/msg/conf/detail.action')}" style="color: #00a0e9" lay-text="修改" th:lay-href="|/msg/conf/detail.action?msgId=${item.msgId}|">修改</a>&nbsp;&nbsp;
        </td>
    </tr>
    </tbody>
</table>
